﻿using AllIsWell.Persistance;
using Moq;
using NUnit.Framework;

namespace AllIsWell.Services.Tests
{
    abstract class AllIsWellServiceTestBase
    {
        protected Mock<IUnitOfWork> UnitOfWorkMock;
        protected Mock<IDestinyRepository> DestinyRepositoryMock;
        protected Mock<IWhatRepository> WhatRepositoryMock;
        protected Mock<IPageRepository> PageRepositoryMock;
        
        [SetUp]
        public void AllIsWellServiceTestSetUp()
        {
            DestinyRepositoryMock = new Mock<IDestinyRepository>();
            WhatRepositoryMock = new Mock<IWhatRepository>();
            PageRepositoryMock = new Mock<IPageRepository>();

            UnitOfWorkMock = new Mock<IUnitOfWork>();

            UnitOfWorkMock.Setup(uow => uow.DestinyRepository).Returns(DestinyRepositoryMock.Object);
            UnitOfWorkMock.Setup(uow => uow.WhatRepository).Returns(WhatRepositoryMock.Object);
            UnitOfWorkMock.Setup(uow => uow.PageRepository).Returns(PageRepositoryMock.Object);
        }
    }
}